
package 实例信息;


class Candy {
	static {
		System.out.println("loading candy");
	}
}

class Gum {
	static {
		System.out.println("loading gum");
	}
}

class Cookie {
	static {
		System.out.println("loading cookie");
	}
}

public class SweetShop {
	public static void main(String[] args) {
		System.out.println("inside main");
		new Candy();
		System.out.println("after creating candy");
		try {
			Class.forName("实例信息.Gum");
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
			System.out.println("can not found Gum class");
		}
		System.out.println("After class.forName(\"Gum\")");
		new Cookie();
		System.out.println("after creating cookie");
	}
}

